﻿@{
    ViewData["Title"] = "基于layui的编辑页面";
    Layout = "~/Views/Shared/_LayuiEdit.cshtml";
}
<form class="layui-form" lay-filter="form" onsubmit="return false;">
    <input type="hidden" name="Id" />
    <div class="layui-form-item">
        <label class="layui-form-label">字段信息</label>
        <div class="layui-input-block">
            <input type="text" name="UserName" class="layui-input" lay-verify="required" placeholder="" value="默认值" />
        </div>
    </div>

    <div class="layui-form-item">
        <div class="layui-input-block">
            <button class="layui-btn" lay-submit="" lay-filter="save">立即提交</button>
            <button type="reset" class="layui-btn layui-btn-primary">重置</button>
            <button type="Button" class="layui-btn layui-btn-danger" onclick="closePage()">关闭</button>
        </div>
    </div>
</form>
<script>
     beforeSaveHandler = function (data) {
        //TODO: 重置提交data
         data["EmpIds"] = "";
         return data;
    }
    addLayuiUseEvent(function () {
        //TODO: 加载后的事件   
    });
</script>